package site.microkang.house.renting.service;

import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import site.microkang.house.renting.mapper.HouseRentingMapper;
import site.microkang.house.renting.model.entity.HouseRentingEntity;
import java.util.Map.Entry;
import java.util.Map;
import java.util.Map;

/**
 * @author liukang
 * @date 2021/3/5 17:19
 */
@Service
@Slf4j
@Transactional(readOnly = true)
public class HouseRentingService {

    @Autowired(required = false)
    private HouseRentingMapper houseRentingMapper;

    @Transactional(readOnly = false)
    public int insert(HouseRentingEntity houseRentingEntity) {
        /*
        todo: 需要处理重复数据, 如何判断重复数据？
         */
        int insert = houseRentingMapper.insert(houseRentingEntity);
        return insert;
    }
}
